<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Produk_model extends CI_Model {
    
    function __construct() {
        parent::__construct();
    }

    function getHarga($jenis){
        $query="select (harga_jual+nominal_custom) as harga from produk where id_produk='$jenis' and is_active=1";
        $result=mysql_query($query);
        $row=mysql_fetch_assoc($result);
        return $row['harga'];
    }
    
    function getDataProduk($jenis){
        $this->db->where('id_produk',$jenis);
        $query=$this->db->get('produk');
        return $query;
    }
    
    

}

?>
